package com.jrx.anytxn.reporting.mapper.ext;

import com.jrx.anytxn.reporting.entity.MrRepaymentPlan;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ExtMrRepaymentPlanMapper {
    /**
     * 批量插入
     * @param planList
     * @return
     */
    int batchInsertMrRepaymentPlan(List<MrRepaymentPlan> planList);

    /**
     * 批量更新还款计划信息
     * @param planList
     * @return
     */
    int batchUpdateMrRepaymentPlan(List<MrRepaymentPlan> planList);

    /**
     * 还款计划表
     * @param tenantId 租户id
     * @param loanId 贷款id
     * @param customerId 客户id
     * @return
     */
    List<MrRepaymentPlan> selectRepaymentPlanResByTenantIdAndLoanIdAndCusId(@Param("tenantId") String tenantId, @Param("loanId")String loanId, @Param("customerId")String customerId);

    /**
     * 根据业务日期查询
     * @param businessDate
     * @return
     */
    List<MrRepaymentPlan> selectByBusinessDate(@Param("businessDate") Date businessDate);

    int countRepaumenPlan(@Param(value = "id") Long id);

}
